package com.itheima.reggie.service;

import com.itheima.reggie.dto.DishDto;
import com.itheima.reggie.entity.Dish;
import com.itheima.reggie.entity.Page;

import java.util.List;

public interface DishService {
    Boolean save(DishDto dishDto);

    Page<DishDto> findByPage(Integer page, Integer pageSize, String name);

    Page<DishDto> findByPage2(Integer page, Integer pageSize, String name);

    DishDto findById(Long id);

    void updateWithFlavors(DishDto dishDto);

    boolean deleteById(Long id);

    boolean updateStatus(Long[] ids,Integer status);
    //boolean updateStatus2(Long[] ids);

    void deleteByIds(Long[] ids);

   // List<Dish> findByCategoryId(Long categoryId);

    Dish findByName(String name);

    List<DishDto> findByCategoryIdAndStatus(Long categoryId, Integer status,String name);
}